<template>
  <div>
    <div>账号切换</div>
    <button @click="admin()" type="default" size="mini">admin</button>
    <button @click="zhangsan()" type="default" size="mini">张三人事经理</button>
    <button @click="lisi()" type="default" size="mini">李四大总统</button>

    <button @click="zzjl()" type="default" size="mini">张总经理</button>
    <div>当前token：{{ token }}</div>
  </div>
</template>

<script>
export default {
  name: "Test",

  data() {
    return {
      token: ''
    };
  },

  created(){
    this.token = window.localStorage.getItem('token')
  },

  methods: {
    admin() {
      window.localStorage.setItem('token', '');
      let token = 'eyJhbGciOiJIUzUxMiIsInppcCI6IkdaSVAifQ.H4sIAAAAAAAAAKtWKi5NUrJScgwN8dANDXYNUtJRSq0oULIyNDcwNDO3NDUx1FEqLU4t8kwBikGYeYm5qUAtiSm5mXlKtQChHbTuQgAAAA.5Mb-oqdOWO4XppxJ_50VNOtxXfWsisGSWZilh8gtgh421HlUx2asz6Oy31phTMsFPqeQB0dWNi9zg1DqCvNE6Q'
      window.localStorage.setItem('token', token);
      this.token = window.localStorage.getItem('token')
    },

    zhangsan() {
      window.localStorage.setItem('token', '');
      let token = 'eyJhbGciOiJIUzUxMiIsInppcCI6IkdaSVAifQ.H4sIAAAAAAAAAKtWKi5NUrJScgwN8dANDXYNUtJRSq0oULIyNDcwNDO3NDM10FEqLU4t8kxRsjKHMPMSc1OBWqoyEvPSixPzlGoBmgun_EUAAAA.uQLbFfH0XdrD0okK0oRmBIOm0cCAFI3eF6FuFg5Gb_gjreqOzg6kV85oyey-2JKEvdilfBydB5PKoi7Q6dausA'
      window.localStorage.setItem('token', token);
      this.token = window.localStorage.getItem('token')
    },

    zzjl() {
      window.localStorage.setItem('token', '');
      let token = 'eyJhbGciOiJIUzUxMiIsInppcCI6IkdaSVAifQ.H4sIAAAAAAAAAKtWKi5NUrJScgwN8dANDXYNUtJRSq0oULIyNDM3NjMwNLYw11EqLU4t8kxRsjKFMPMSc1OBWqqqsnKUagGHebUNQQAAAA.FcCkD6QfaP8bd_3MYsRD6Tp9wr9JSRFWIUuIdG5O7XxhIeyWfzGLp40_Lesx_kWMMaaskh_ba3NrTlj8-nP6OA'
      window.localStorage.setItem('token', token);
      this.token = window.localStorage.getItem('token')
    },

    lisi() {
      window.localStorage.setItem('token', '');
      let token = 'eyJhbGciOiJIUzUxMiIsInppcCI6IkdaSVAifQ.H4sIAAAAAAAAAKtWKi5NUrJScgwN8dANDXYNUtJRSq0oULIyNDcwNDO3NDcw1lEqLU4t8kxRsjKBMPMSc1OBWnIyizOVagGHfOzMQQAAAA.Xkq-1kwep5GRO4rVG35Dz2IPhjNdSozwpZurjogPGT5BTCagqtyO8spVWfuaXCS4j5wb_T31kxrQv0zHUfwyig'
      window.localStorage.setItem('token', token);
      this.token = window.localStorage.getItem('token')
    }
  }
}
</script>
